<?php
define('IN_LM', true);
$start = microtime(true);

include_once("./config/sql.php");
include_once("./config.php");


$ac=array(
    'login'=>"login.php",
    'ma'=>"ma.php",
    'users'=>"users.php"
);

$GLOBALS['sql']=new Database('localhost', MYSQL_DBNAME, MYSQL_USERNAME, MYSQL_PASSWORD);


header("Content-type:application/json");

$return_data=array();

//code
foreach ($ac as $key => $value)
{ 
    if($_GET['ac']==$key)
    {
        //echo "./".$value;
        include_once("./".$value);
        $key($return_data);
        break;
    }
}


$end = microtime(true);
$time=$end-$start;
$return_data['api_time']=number_format($time, 10, '.', '')." seconds";
echo json_encode($return_data,JSON_UNESCAPED_UNICODE);
$GLOBALS['sql']->closedb();





?>